package com.theanh.RssActivity.util;

import com.theanh.RssActivity.Store;
import com.theanh.RssActivity.db.DbAdapter;

public class DbUtils {

	public static DbAdapter createDbAdapter(){
		DbAdapter dbAdapter = new DbAdapter(Store.context);
		return dbAdapter;
	}
	
	public static DbAdapter createAndOpenDbAdapter(){
		DbAdapter dbAdapter = new DbAdapter(Store.context);
		dbAdapter.open();
		return dbAdapter;
	}
	
	public static void closeDbAdapter(DbAdapter dbAdapter){
		if (dbAdapter != null)
			dbAdapter.close();
	}
}
